exports.install = function(Vue, options) {
  var  wx = false;//判断微信和企业微信
  var weixin = false//判断企业微信
  Vue.prototype.global = function() {
    //全局函数判断是不是微信服务号
    var ua = navigator.userAgent.toLowerCase();
    var workWeixin = ua.indexOf("micromessenger") != -1;
    var url = document.location.toString();
    var arrObj = url.split("?");
    if (arrObj.length > 1) {
      var arrPara = arrObj[1].split("&");
      var link
      for(var i = 1;i < arrPara.length; i++){
         link = arrPara[i].split("=")
         var link1 = link[1].split("#")
         var isWeixin = link1[0];
      }
    }
    if (isWeixin == 'weixin') {
      this.weixin = true;
    } else {
      this.weixin = false;
    }
    if(workWeixin){
        this.wx = true
    }else{
        this.wx = false
    }
  };
};

